package org.spark.core.transformations.scala

import org.spark.sparkUtil.SparkScalaContextUtil

object Map {
  def main(args: Array[String]): Unit = {
    val sc = SparkScalaContextUtil.getSparkStart("map");
    val numbers = Array(1, 2, 3, 4, 5)
    val numberRDD = sc.parallelize(numbers, 1)
    val multipleNumberRDD = numberRDD.map { num => num * 2 }

    multipleNumberRDD.foreach { num => println(num) }
  }

}
